{extend name="base" /} {block name="body"}

<div id="search">
    <div class="search">
        <div class="title">
            <h1>素材大数据</h1>
            <p>没有做不到，只有想不到，打造优质广告素材网站</p>
        </div>
        <div class="input">
            <div class="tip"></div>
            <input type="text" placeholder="请输入关键字" />
            <div class="search_list">

            </div>
            <div class="host_search">
                {if condition="cookie('search')"}
                    {foreach name=":cookie('search')" item="s"}
                    <a href="#">{$s}</a>
                    {/foreach}
                {else /}
                    暂无搜索记录
                {/if}
            </div>
            <button type="button" class="button">
                <i class="mdui-icon material-icons">search</i>搜索</button>
            <div class="select">
                <span class="value" value="1">文案
                    <i class="mdui-icon material-icons">play_arrow</i>
                </span>
                <ul class="option">
                    <li value="1">文案</li>
                    <li value="2">图片</li>
                </ul>
            </div>

        </div>
        <div class="hots">
            {foreach name="rec" item="r"}
            <span>{$r.text}</span>
            {/foreach}
        </div>
    </div>
</div>

<div class="classify">
    <div class="classify_item">
        <div class="item">
            <div class="title">
                <span>原创</span>
            </div>
            <div class="info">
                <h2>每日大更新</h2>
                <p>每日数千素材更新量，满足推广运营的最新创意需求</p>
            </div>
        </div>
        <div class="item">
            <div class="title">
                <span>共享</span>
            </div>
            <div class="info">
                <h2>每日大更新</h2>
                <p>每日数千素材更新量，满足推广运营的最新创意需求</p>
            </div>
        </div>
        <div class="item">
            <div class="title">
                <span>商用</span>
            </div>
            <div class="info">
                <h2>每日大更新</h2>
                <p>每日数千素材更新量，满足推广运营的最新创意需求</p>
            </div>
        </div>
    </div>
</div>
<div class="ad_box">
    <div class="swiper-container ad_box_item">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                <img src="__STATIC__/doclist/images/ad.png" alt="">
            </div>
            <div class="swiper-slide">
                <img src="__STATIC__/doclist/images/ad.png" alt="">
            </div>
            <div class="swiper-slide">
                <img src="__STATIC__/doclist/images/ad.png" alt="">
            </div>
        </div>
        <div class="swiper-pagination ad_box_pages"></div>
    </div>
</div>

<div class="hots">
    <div class="hots_item">
        <div class="hot_search">
            <div class="title">
                <b>每日热搜</b>
            </div>
            <div class="list">
                {foreach name="article_hot" item="article_category"}
                    <a href="javascript:;" onclick="getHotArticleList({$article_category.id});" class="item"><span>{$article_category.name}</span></a>
                {/foreach}
            </div>
        </div>
        <div class="hot_doc">
            <div class="title"></div>
            <div class="list">
                <div class="pic">
                    <a href="#">
                        <span class="tag">文案</span>
                        <div class="img">
                            <img src="__STATIC__/doclist/images/1111111.png" alt="">
                        </div>
                        <div class="text">
                            <h2>【精华】老中医说：男人多吃这个，时间延长5倍！</h2>
                            <div class="opt">
                                <div class="time">
                                    <i class="mdui-icon material-icons">access_time</i>2018-05-04
                                </div>
                            </div>
                            <p>
                                是我们今天的主人公——中医第五代传人汤老师。他家祖为皇家配制的秘方，秘方传到现在，经过不断加以改进力追捧，他自称为...
                            </p>
                        </div>
                    </a>
                </div>
                <div class="item">
                    <a href="#">
                        <p>价值4万元的经验！我用5年的补肾经历告诉你我用5年的补肾经历告诉你我用5年的补肾经历告诉你我用5年的补肾经历告诉你</p>
                        <span class="time">2018-05-04</span>
                    </a>
                </div>
                <div class="item">
                    <a href="#">
                        <p>价值4万元的经验！我用5年的补肾经历告诉你</p>
                        <span class="time">2018-05-04</span>
                    </a>
                </div>
                <div class="item">
                    <a href="#">
                        <p>价值4万元的经验！我用5年的补肾经历告诉你</p>
                        <span class="time">2018-05-04</span>
                    </a>
                </div>
                <div class="item">
                    <a href="#">
                        <p>价值4万元的经验！我用5年的补肾经历告诉你</p>
                        <span class="time">2018-05-04</span>
                    </a>
                </div>
            </div>
            <div class="more">
                <a href="#">查看更多>></a>
            </div>
        </div>
        <dov class="count">
            <div class="title">
                <b>统计</b>
            </div>
            <div class="count_box">
                {foreach name="count" item="c"}
                <div class="item">{$c.name}:{$c.count}</div>
                {/foreach}
            </div>
        </dov>
    </div>
</div>


<div class="listss pic_list">
    <div class="title">
        <b>文案热门</b>
    </div>
    <div class="list">
        {foreach name="article_hot_list" item="hot"}
        <div class="item" type="pic">
            <div class="img">
                <img src="{$hot.thumb}" alt="">
                <div class="tag">热门</div>
                <div class="hover">
                    <div class="like {if condition='isset($Think.session.index_user.collection[1][$hot.id])'}active{/if}"  data-id='{$hot.id}' data-type = '1'>收藏</div>
                    <a href="/index/download/download/id/{$hot.id}/type/wenan" class="download">
                        <i class="mdui-icon material-icons">vertical_align_bottom</i>点击下载</a>
                </div>
            </div>
            <p>{$hot.title}</p>
        </div>
        {/foreach}
    </div>
    <div class="more">
        <a href="/index/pic_list/pic_list">查看更多>></a>
    </div>
</div>


<div class="pic_list" style="display:none;">
    <div class="title">
        <b>原创热门</b>
    </div>
    <div class="list">
        {foreach name="ori_hot" item="ori"}
        <div class="item" type="pic">
            <div class="img">
                <div class="tag">原创</div>
                {if condition="!session('index_id')"}
                <img src="{$ori.thumb}" alt=""> {else /}
                <img src="{$ori.path}" alt="">
                <div class="hover">
                    <div class="like">收藏</div>
                    <a href="/index/download/download/id/{$ori.id}type/image" class="download">
                        <i class="mdui-icon material-icons">vertical_align_bottom</i>点击下载</a>
                </div>{/if}
            </div>
            <p>{$ori.title}</p>
        </div>
        {/foreach}
    </div>
    <div class="more">
        <a href="/index/pic_list/pic_list">查看更多>></a>
    </div>
</div>


<div class="listss pic_list" style="display:none;">
    <div class="title">
        <b>积分热门</b>
    </div>
    <div class="list">
        {foreach name="int_hot" item="int"}
        <div class="item" type="pic">
            <div class="img">
                {if condition="!session('index_id')"}
                <img src="{$int.thumb}" alt=""> {else /}
                <img src="{$int.path}" alt=""> {/if}
                <div class="tag">积分</div>
                <div class="hover">
                    <div class="like">收藏</div>
                    <a href="/index/download/download/id/{$int.id}type/image" class="download">
                        <i class="mdui-icon material-icons">vertical_align_bottom</i>点击下载</a>
                </div>
            </div>
            <p>{$int.title}</p>
        </div>
        {/foreach}
    </div>
    <div class="more">
        <a href="/index/pic_list/pic_list">查看更多>></a>
    </div>
</div>



<div class="listss class_list">
    <div class="title">
        <b>素材热门</b>
    </div>
    <div class="pic">
        {foreach name="share_hot" item="share"}
        <div class="item">
            {if condition="!session('index_id')"}
            <img src="{$share.thumb}" alt="">
            <a target="_blank" href="/index/download/download/id/{$share.id}/type/image">图片素材</a>
            {else /}
            <img src="{$share.path}" alt="">
            <a target="_blank" href="/index/download/download/id/{$share.id}/type/image">图片素材</a>
            {/if}
        </div>
        {/foreach}
    </div>
    <div class="text">
        {foreach name = "imgcategory_level_list" item = "il"}
        <a href="/index/pic_list/pic_list/sid/{$il.id}" class="item">{$il.name}</a>
        {/foreach}
    </div>
</div>

{/block} {block name="script"}
<script>
    $(document).ready(function () {
        getHotArticleList(1);
    })
    function getHotArticleList(id) {
        $.ajax({
            url: '/index/index/hotarticlelist',
            type: 'POST',
            data: { id: id },
            success: function (res) {
                $('.hot_doc *').remove();
                $('.hot_doc').append(res);
            }
        });
    }
</script> {/block}